//
//  SDHeaderInfoCell.swift
//  SortProject
//
//  Created by ALH000355 on 2022/7/15.
//

import UIKit

class SDHeaderInfoCell: UITableViewCell {

    var topIv: UIImageView!
    var titleLb: UILabel!
//    var yearLb: UILabel!
//    var shareBtn: UIButton!
//    var addressLb: UILabel!
    var businessLb: UILabel!
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        uiConfig()
    }
    
    func uiConfig() {
        topIv = UIImageView.init()
        topIv.backgroundColor = .gray
        contentView.addSubview(topIv)
        topIv.snp.makeConstraints { make in
            make.left.top.right.equalTo(0)
            make.height.equalTo(SCREEN_WIDTH * 0.7)
        }
        
        let divideLine = UIView.init()
        divideLine.backgroundColor = .cyan
        contentView.addSubview(divideLine)
        divideLine.snp.makeConstraints { make in
            make.left.right.equalTo(0)
            make.top.equalTo(topIv.snp.bottom)
            make.height.equalTo(5)
        }
        
        titleLb = UILabel.init()
        titleLb.text = "店铺名称店铺名称店铺名称"
        contentView.addSubview(titleLb)
        titleLb.font = .systemFont(ofSize: 16, weight: .medium)
        titleLb.snp.makeConstraints { make in
            make.left.equalTo(20)
            make.top.equalTo(topIv.snp.bottom).offset(20)
            make.width.equalTo(220)
            make.height.equalTo(22)
        }
        
        businessLb = UILabel.init()
        businessLb.text = "主营：这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多"
        contentView.addSubview(businessLb)
        businessLb.textColor = .gray
        businessLb.numberOfLines = 0
        businessLb.lineBreakMode = .byCharWrapping
        businessLb.font = .systemFont(ofSize: 14)
        businessLb.snp.makeConstraints { make in
            make.left.equalTo(20)
            make.right.equalTo(-10)
            make.top.equalTo(titleLb.snp.bottom).offset(20)
//            make.height.equalTo(10)
            make.bottom.equalTo(-10)
        }
    }

}
